﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using LCA.Data;

public partial class Admin_LCAFlow_Controls_FlowSearchFilter : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    public FlowSearchParameters SearchParameters { get; set; }

    public event EventHandler SubmitClicked;

    protected void OnSubmitClicked(EventArgs e)
    {
        if (SubmitClicked != null)
        {
            SubmitClicked(this, e);
        }
    }

    protected void btnSearch_Click(object sender, EventArgs e)
    {
        var searchParameters = new FlowSearchParameters();
        searchParameters.Name = txtSearchName.Text.Trim();

        this.SearchParameters = searchParameters;

        OnSubmitClicked(new EventArgs());
    }

    protected void btnViewAll_Click(object sender, EventArgs e)
    {
        this.SearchParameters = new FlowSearchParameters();

        OnSubmitClicked(new EventArgs());
    }
}